package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbDutyUserId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbDutyUserId implements java.io.Serializable {

	// Fields

	private short udId;
	private Integer uiId;

	// Constructors

	/** default constructor */
	public TbDutyUserId() {
	}

	/** full constructor */
	public TbDutyUserId(short udId, Integer uiId) {
		this.udId = udId;
		this.uiId = uiId;
	}

	// Property accessors

	@Column(name = "ud_id")
	public short getUdId() {
		return this.udId;
	}

	public void setUdId(short udId) {
		this.udId = udId;
	}

	@Column(name = "ui_id")
	public Integer getUiId() {
		return this.uiId;
	}

	public void setUiId(Integer uiId) {
		this.uiId = uiId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbDutyUserId))
			return false;
		TbDutyUserId castOther = (TbDutyUserId) other;

		return (this.getUdId() == castOther.getUdId())
				&& ((this.getUiId() == castOther.getUiId()) || (this.getUiId() != null
						&& castOther.getUiId() != null && this.getUiId()
						.equals(castOther.getUiId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getUdId();
		result = 37 * result
				+ (getUiId() == null ? 0 : this.getUiId().hashCode());
		return result;
	}

}